<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <select id="select">
        <option value="苹果">苹果</option>
        <option value="火龙果">火龙果</option>
        <option value="橙子">橙子</option>
    </select>
    <script>
        const options = document.querySelectorAll('#select option')
        const index = Math.floor(Math.random() * options.length)
        options[index].selected = true
    </script>
</body>
</html>